/* eslint-disable */
import request from "@/request";

/** getCurrentStore GET /api/api/store/current */
export async function getCurrentStoreUsingGet(options?: {
  [key: string]: any;
}) {
  return request<API.BaseResponseStore_>("/api/api/store/current", {
    method: "GET",
    ...(options || {}),
  });
}

/** getStoreInfo POST /api/api/store/info */
export async function getStoreInfoUsingPost(
  body: API.StoreIdRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseStore_>("/api/api/store/info", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** calculateMonthlySales POST /api/api/store/monthly-sales/calculate */
export async function calculateMonthlySalesUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.calculateMonthlySalesUsingPOSTParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseVoid_>(
    "/api/api/store/monthly-sales/calculate",
    {
      method: "POST",
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** getStoreSalesHistory GET /api/api/store/monthly-sales/history */
export async function getStoreSalesHistoryUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getStoreSalesHistoryUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageMonthlyStoreSales_>(
    "/api/api/store/monthly-sales/history",
    {
      method: "GET",
      params: {
        // pageNum has a default value: 1
        pageNum: "1",
        // pageSize has a default value: 10
        pageSize: "10",
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** getMonthlyStoreSales GET /api/api/store/monthly-sales/list */
export async function getMonthlyStoreSalesUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getMonthlyStoreSalesUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseListMonthlyStoreSales_>(
    "/api/api/store/monthly-sales/list",
    {
      method: "GET",
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** getStoreMonthlySales GET /api/api/store/monthly-sales/store */
export async function getStoreMonthlySalesUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getStoreMonthlySalesUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseMonthlyStoreSales_>(
    "/api/api/store/monthly-sales/store",
    {
      method: "GET",
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** getTotalSalesByMonth GET /api/api/store/monthly-sales/total */
export async function getTotalSalesByMonthUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getTotalSalesByMonthUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBigdecimal_>(
    "/api/api/store/monthly-sales/total",
    {
      method: "GET",
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** getYearlyStoreSales GET /api/api/store/monthly-sales/yearly */
export async function getYearlyStoreSalesUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getYearlyStoreSalesUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseListMonthlyStoreSales_>(
    "/api/api/store/monthly-sales/yearly",
    {
      method: "GET",
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** getStoreName GET /api/api/store/name/${param0} */
export async function getStoreNameUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getStoreNameUsingGETParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResponseString_>(`/api/api/store/name/${param0}`, {
    method: "GET",
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** switchCurrentStore POST /api/api/store/switch */
export async function switchCurrentStoreUsingPost(
  body: API.StoreIdRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseStore_>("/api/api/store/switch", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** getStoresByUserId POST /api/api/store/user/stores */
export async function getStoresByUserIdUsingPost(
  body: API.UserIdRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseListStore_>("/api/api/store/user/stores", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

/** getStoreYearlySales GET /api/api/store/yearly-sales/store */
export async function getStoreYearlySalesUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getStoreYearlySalesUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseListMonthlyStoreSales_>(
    "/api/api/store/yearly-sales/store",
    {
      method: "GET",
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}
